/**
 * 
 */
package com.haisen.lee.domain;

/**
 * @author Haisen Lee
 * 
 */
public class ResultAttribute<T> {

	private String attributeName;
	private T attributeValue;

	/**
	 * 
	 */
	public ResultAttribute() {

	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((attributeName == null) ? 0 : attributeName.hashCode());
		result = prime * result
				+ ((attributeValue == null) ? 0 : attributeValue.hashCode());
		return result;
	}

	@SuppressWarnings("unchecked")
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ResultAttribute<T> other = (ResultAttribute<T>) obj;
		return other.hashCode() == hashCode();
	}

	public String getAttributeName() {
		return attributeName;
	}

	public void setAttributeName(String attributeName) {
		this.attributeName = attributeName;
	}

	public T getAttributeValue() {
		return attributeValue;
	}

	public void setAttributeValue(T attributeValue) {
		this.attributeValue = attributeValue;
	}

}
